<?php
/*
Primary Author: Derek Shue
Secondary: Alex Arey
Documentation: Cheng Yi
Updated: 12/10/2011
Module Description: The Teacher Profile form is used by Teachers to add/edit their viewable profile.
*/
class Application_Form_TeacherProfile extends Zend_Form
{

    public function init()
    {
        $this->setMethod('post');

		$nameLenValid = new Zend_Validate_StringLength(array('max' => 30));
		$shortTextLenValid = new Zend_Validate_StringLength(array('max'=>8));
		$medTextLenValid = new Zend_Validate_StringLength(array('max' => 60));
		$longTextLenValid = new Zend_Validate_StringLength(array('max' => 120));
		$emailLenValid = new Zend_Validate_StringLength(array('max' => 100));
		$phonevalid = new Zend_Validate_Regex(array('pattern' => '/^\(\d\d\d\) ?\d\d\d-\d\d\d\d$/'));
		
		$this->addElement('text','FIRSTNAME',array(
	    'label' => 'First Name:',
	    'filters' => array('StringTrim'),
	    'validators'=>array($nameLenValid),
	    'required' => True,
	    )
	);		
		
		
		$this->addElement('text','LASTNAME',array(
	    'label' => 'Last Name:',
	    'filters' => array('StringTrim'),
	    'validators'=>array($nameLenValid),
	    'required' => True,
	    )
	);		
		
		$this->addElement('text','EMAIL',array(
		'label' => 'Email Address:',
			    'filters' => array('StringTrim'),
			    'validators' => array('EmailAddress',$emailLenValid),
			    'required' => True,
		)
		);
		
	$this->addElement('text','DEPARTMENT',array(
	    'label' => 'Department:',
	    'filters' => array('StringTrim'),
	    'validators'=>array($medTextLenValid),
	    'required' => True,
	    )
	);

	
		$this->addElement('text','OFFICELOCATION',array(
	    'label' => 'Website:',
	    'filters' => array('StringTrim'),
	    'validators'=>array($medTextLenValid),
	    'required' => True,
	    )
	);
	
		$this->addElement('submit','submit',array(
	    'label' => 'submit',
	    )
	);
	
	
	}
	


}

